<template>
  <div class="app-container">
    <el-table
      :data="tableData"
      style="width: 100%">

      <el-table-column
        prop="name"
        label="姓名"
        width="180">
      </el-table-column>

      <el-table-column
        prop="createTime"
        label="创建时间">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { getList } from '@/api/table'
import request from '@/utils/request'

export default {

  data() {
    return {
      tableData:[

      ]
    }
  },
  created() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      let me =this
      request({
        url:'/test/list',
        method: 'post',
      }).then(function(response){
        var res=response.data
        console.log(res)
        me.tableData=res
      })
    }
  }
}
</script>
